// 获取列表
var config = require("../../util/dbconfig");
getList = (req, res) => {
  let pageSize = 20;
  let pageNum = 1;
  const startIndex = (pageNum - 1) * pageSize;
  var sql = `SELECT * FROM list LIMIT ${startIndex}, ${pageSize}`;
  var sqlArr = [];
  var callBack = (err, data) => {
    if (err) {
      console.log("连接出错拉");
    } else {
      res.send({
        code: 200,
        message: "成功",
      });
    }
  };
  config.sqlConnect(sql, sqlArr, callBack);
};
module.exports = {
  getList,
};
